package com.oig.sys.log.feign.factory;

import com.oig.sys.log.feign.SysAuditLogService;
import com.oig.sys.log.feign.fallback.SysAuditLogServiceFallBackImpl;
import org.springframework.cloud.openfeign.FallbackFactory;
import org.springframework.stereotype.Component;

@Component
public class SysAuditLogFallBackFactory implements FallbackFactory<SysAuditLogService> {


    @Override
    public SysAuditLogService create(Throwable cause) {
        SysAuditLogServiceFallBackImpl serviceFallBack = new SysAuditLogServiceFallBackImpl();
        serviceFallBack.setCause(cause);
        return serviceFallBack;
    }

}
